package com.meida.module.bus.provider.service;

import com.meida.common.mybatis.base.service.IBaseService;
import com.meida.common.mybatis.model.ResultBody;
import com.meida.module.bus.client.entity.BusAfterservice;

import java.math.BigDecimal;

/**
 * 订单售后 接口
 *
 * @author flyme
 * @date 2021-08-03
 */
public interface BusAfterserviceService extends IBaseService<BusAfterservice> {

    /**
     * 统计某学霸售后订单数量
     *
     * @param answerUserId
     * @return
     */
    Integer totalAfterServiceOrderNum(Long answerUserId);

    /**
     * 订单售后审核
     *
     * @param afterServiceId
     * @param state
     * @param auditMind
     * @return
     */
    ResultBody checkOrderAfterService(Long afterServiceId, Integer state, String auditMind);

    /**
     * 合计申请售后的金额
     *
     * @param state
     * @return
     */
    BigDecimal sumAmountByState(Integer state);

    /**
     * 根据订单ID查询
     */
    BusAfterservice getByOrderId(Long orderId);

    /***
     * 申请售后
     */
    void applyBusAfterservice(Long orderId);
}
